package com.one.blocks.mvc.valid.validator;

import javax.validation.ConstraintValidatorContext;

/**
 * @author <a href="mailto:idler41@163.com">linfuxin</a> created by 2022-12-11 16:10:44
 */
public interface AllocatedDataManager<K> {

    /**
     * 是否存在关联数据
     *
     * @param k       需要验证的参数集合
     * @param context 校验上下文
     * @return 不存在关联数据返回true，否则返回false
     */
    default boolean findAllocatedData(K k, ConstraintValidatorContext context) {
        throw new UnsupportedOperationException();
    }
}
